﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="../js/stringHelper.js" type="text/javascript"></script>
    <script type="text/javascript">
        function showItem(str, item, val) {
            document.writeln(str + "-----------" + item + " : " + val);
            document.write("<br />");
        }

        var str = "站点：Bndy.net";
        showItem(str, "getLength()", str.getLength());
        showItem(str, "cutString(3)", str.cutString(3));
        showItem(str, "cutString(7)", str.cutString(7));
        showItem(str, "cutString(7, '>>>')", str.cutString(7,">>>"));

        var str = "";
        showItem(str, "isEmpty()", str.isEmpty());

        var str = "1900-1-1";
        showItem(str, "isDate()", str.isDate());
        var str = "1900-1-1 12:11:11";
        showItem(str, "isDate()", str.isDate());
        var str = "1900-1-1 12:11:66";
        showItem(str, "isDate()", str.isDate());
        var str = "2010-2-30 12:11:66";
        showItem(str, "isDate()", str.isDate());

        var str = "1.21211231";
        showItem(str, "isDecimal()", str.isDecimal());

        var str = "awfw@gmail.com";
        showItem(str, "isEmail()", str.isEmail());
        var str = "1212awfw@gmail";
        showItem(str, "isEmail()", str.isEmail());

        var ff = '';
        alert(ff == undefined);
    </script>
</head>
<body>
</body>
</html>
